AI Behaviour Trees
AI Behavior trees can be broken into multiple assets
New Behavior tree runs NewBehaviourTree1. Statuses and events will propagate up from one to the other.
You can run state trees dynamically with Run Dynamic Behavior
This node for example will run a dynamic behavior tree.
From C++ there is a function called
UBehaviorComponent::SetDynamicSubtree
This function takes in a gameplay tag and a reference to a
UBehaviorTree
asset.
Notice the
All nodes matching this tag, will have their behavior trees set by
the SetDynamicSubtree
call.
Putting it together we can basically author a bunch of attacks using dynamic subtrees. and run it all through two tasks.
The second task there will run multiple attack behaviours randomly now.
This is pretty awesome because it allows us to reuse the same attacks in various different situations.